import { axios } from '@choerodon/master';
// 重试
function retry(projectId:string, id:string) {
  return axios.put(`/devops/v1/projects/${projectId}/pipeline_records/${id}/retry`);
}
// 取消执行
function cancelExecute(projectId:string, id:string) {
  return axios.put(`/devops/v1/projects/${projectId}/pipeline_records/${id}/cancel`);
}
// 校验stage、job审核状态是否改变
function checkStatus(projectId:string, id:string) {
  return axios.post(`/devops/v1/projects/${projectId}/pipeline_job_records/${id}/check_audit_status`);
}
// 人工审核
function persionCheck(projectId:string, id:string, result:any) {
  return axios.post(`/devops/v1/projects/${projectId}/pipeline_job_records/${id}/audit? result=${result}`);
}
export {
  retry,
  cancelExecute,
  checkStatus,
  persionCheck,
};
